home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / multipad.zip / MULTIPAD.H < prev    next >
C/C++ Source or Header  |  1992-05-01  |  5KB  |  173 lines

  1. #include "windows.h"
  2. #include "drivinit.h"
  3.  
  4. #ifndef CDECL
  5. #define CDECL cdecl
  6. #endif
  7.  
  8. #define WINDOWMENU  3    /* position of window menu         */
  9. #define SHORTMENU   2    /* position of short version window menu */
  10.  
  11. #define DEFFILESEARCH    (LPSTR) "*.TXT"
  12.  
  13. #ifdef RC_INVOKED
  14. #define ID(id) id
  15. #else
  16. #define ID(id) MAKEINTRESOURCE(id)
  17. #endif
  18.  
  19. /* edit control identifier */
  20. #define ID_EDIT 0xCAC
  21.  
  22. /* resource ID's */
  23. #define IDMULTIPAD  ID(1)
  24. #define IDMULTIPAD2 ID(3)
  25. #define IDNOTE        ID(2)
  26.  
  27. /* Window word values for child windows */
  28. #define GWW_HWNDEDIT    0
  29. #define GWW_CHANGED    2
  30. #define GWW_WORDWRAP    4
  31. #define GWW_UNTITLED    6
  32. #define CBWNDEXTRA    8
  33.  
  34. /* menu ID's */
  35. #define IDM_FILENEW    1001
  36. #define IDM_FILEOPEN    1002
  37. #define IDM_FILESAVE    1003
  38. #define IDM_FILESAVEAS    1004
  39. #define IDM_FILEPRINT    1005
  40. #define IDM_FILEEXIT    1006
  41. #define IDM_FILEABOUT    1007
  42. #define IDM_FILESETUP    1008
  43. #define IDM_FILEMENU    1009
  44.  
  45. #define IDM_EDITUNDO    2001
  46. #define IDM_EDITCUT    2002
  47. #define IDM_EDITCOPY    2003
  48. #define IDM_EDITPASTE    2004
  49. #define IDM_EDITCLEAR    2005
  50. #define IDM_EDITSELECT    2006
  51. #define IDM_EDITTIME    2007
  52. #define IDM_EDITWRAP    2008
  53. #define IDM_EDITFONT    2009
  54. #define IDM_EDITFIRST    IDM_EDITUNDO
  55. #define IDM_EDITLAST    IDM_EDITFONT
  56.  
  57. #define IDM_SEARCHFIND    3001
  58. #define IDM_SEARCHNEXT    3002
  59. #define IDM_SEARCHPREV    3003
  60. #define IDM_SEARCHFIRST IDM_SEARCHFIND
  61. #define IDM_SEARCHLAST    IDM_SEARCHPREV
  62.  
  63. #define IDM_WINDOWTILE    4001
  64. #define IDM_WINDOWCASCADE 4002
  65. #define IDM_WINDOWCLOSEALL  4003
  66. #define IDM_WINDOWICONS 4004
  67.  
  68. #define IDM_WINDOWCHILD 4100
  69.  
  70. #define IDM_HELPHELP    5001
  71. #define IDM_HELPABOUT    5002
  72. #define IDM_HELPSPOT    5003
  73.  
  74. #define IDD_FILEOPEN    ID(200)
  75. #define IDD_FILENAME    201
  76. #define IDD_FILES    202
  77. #define IDD_PATH    203
  78. #define IDD_DIRS    204
  79.  
  80. /* dialog ids */
  81. #define IDD_ABOUT    ID(300)
  82.  
  83. #define IDD_FIND    ID(400)
  84. #define IDD_SEARCH    401
  85. #define IDD_PREV    402
  86. #define IDD_NEXT    IDOK
  87. #define IDD_CASE    403
  88.  
  89. #define IDD_SAVEAS    ID(500)
  90. #define IDD_SAVEFROM    501
  91. #define IDD_SAVETO    502
  92.  
  93. #define IDD_PRINT    ID(600)
  94. #define IDD_PRINTDEVICE 601
  95. #define IDD_PRINTPORT    602
  96. #define IDD_PRINTTITLE    603
  97.  
  98. #define IDD_FONT    ID(700)
  99. #define IDD_FACES    701
  100. #define IDD_SIZES    702
  101. #define IDD_BOLD    703
  102. #define IDD_ITALIC    704
  103. #define IDD_FONTTITLE    705
  104.  
  105. /* strings */
  106. #define IDS_CANTOPEN    1
  107. #define IDS_CANTREAD    2
  108. #define IDS_CANTCREATE    3
  109. #define IDS_CANTWRITE    4
  110. #define IDS_ILLFNM    5
  111. #define IDS_ADDEXT    6
  112. #define IDS_CLOSESAVE    7
  113. #define IDS_CANTFIND    8
  114. #define IDS_HELPNOTAVAIL 9
  115.  
  116. #define IDS_CLIENTTITLE 16
  117. #define IDS_UNTITLED    17
  118. #define IDS_APPNAME    18
  119.  
  120. #define IDS_PRINTJOB    24
  121. #define IDS_PRINTERROR    25
  122.  
  123. /* attribute flags for DlgDirList */
  124. #define ATTR_DIRS    0xC010        /* find drives and directories */
  125. #define ATTR_FILES    0x0000        /* find ordinary files           */
  126. #define PROP_FILENAME    szPropertyName    /* name of property for dialog */
  127.  
  128. /*
  129.  *  External variable declarations
  130.  */
  131. extern HANDLE hInst;        /* application instance handle          */
  132. extern HANDLE hAccel;        /* resource handle of accelerators      */
  133. extern HWND hwndFrame;        /* main window handle              */
  134. extern HWND hwndMDIClient;    /* handle of MDI Client window          */
  135. extern HWND hwndActive;     /* handle of current active MDI child      */
  136. extern HWND hwndActiveEdit;    /* handle of edit control in active child */
  137. extern LONG styleDefault;    /* default child creation state       */
  138. extern char szChild[];        /* class of child              */
  139. extern char szSearch[];     /* search string              */
  140. extern char *szDriver;        /* name of printer driver          */
  141. extern char szPropertyName[];    /* filename property for dialog box      */
  142. extern int iPrinter;        /* level of printing capability       */
  143. extern BOOL fCase;        /* searches case sensitive          */
  144. extern WORD cFonts;        /* number of fonts enumerated          */
  145.  
  146. /*  externally declared functions
  147.  */
  148. extern BOOL FAR PASCAL InitializeApplication(VOID);
  149. extern BOOL FAR PASCAL InitializeInstance(LPSTR,WORD);
  150. extern BOOL FAR PASCAL AboutDlgProc(HWND,WORD,WORD,LONG);
  151. extern HWND FAR PASCAL AddFile(char *);
  152. extern VOID FAR PASCAL ReadFile(HWND);
  153. extern VOID FAR PASCAL SaveFile(HWND);
  154. extern BOOL FAR PASCAL ChangeFile(HWND);
  155. extern int FAR PASCAL LoadFile(HWND, char *);
  156. extern VOID FAR PASCAL PrintFile(HWND);
  157. extern BOOL FAR PASCAL GetInitializationData(HWND);
  158. extern short FAR CDECL MPError(HWND,WORD,WORD,...);
  159. extern VOID FAR PASCAL Find(void);
  160. extern VOID FAR PASCAL FindNext(void);
  161. extern VOID FAR PASCAL FindPrev(void);
  162. extern VOID FAR PASCAL MPSpotHelp(HWND,POINT);
  163. extern LONG FAR PASCAL MPFrameWndProc(HWND,UINT,WPARAM,LPARAM);
  164. extern LONG FAR PASCAL MPMDIChildWndProc(HWND,UINT,WPARAM,LPARAM);
  165. extern HDC FAR PASCAL GetPrinterDC(void);
  166. extern VOID NEAR PASCAL SetSaveFrom (HWND, PSTR);
  167. extern BOOL NEAR PASCAL RealSlowCompare (PSTR, PSTR);
  168. extern VOID FAR PASCAL FindPrev (void);
  169. extern VOID FAR PASCAL FindNext (void);
  170. extern BOOL NEAR PASCAL IsWild (PSTR);
  171. extern VOID NEAR PASCAL SelectFile (HWND);
  172. extern VOID NEAR PASCAL MyFindText ( int );
  173.